#ifndef INC_MODIFYTEXTCMD_H
#define INC_MODIFYTEXTCMD_H

#include "Command.h"

#include <QString>

class UMLObject;

class ModifyTextCmd : public Command
{
	public:
		ModifyTextCmd(UMLObject* target, const QString& text);

		/*** ACCESSORS ***/

		const UMLObject* target() const;
		const QString& text() const;
		void setText(const QString&);

		/*** COMMAND STUFF ***/

		void execute();
		void unexecute();
		bool useful() const;
		const char* name() const;

	private:
		bool _executed; // init-checked
		UMLObject* _target; // init-checked
		QString _text;
		QString _oldtext;
};

inline const UMLObject* ModifyTextCmd::target() const
{
	return _target;
}

#endif // INC_MODIFYTEXTCMD_H

